package com.springboot.log4j.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Desc: Hello World 控制层
 * @Date: 2020-07-09
 * @Version:v1.0
 */
@RestController
@RequestMapping("/hello")
public class HelloController {

    private Logger logger = LoggerFactory.getLogger(HelloController.class);


    @GetMapping("/say")
    public String sayHello() {
        logger.info("HelloController.sayHello info");
        logger.debug("HelloController.sayHello debug");
        logger.warn("HelloController.sayHello warn");
        logger.error("HelloController.sayHello error");
        return "hello world, Spring Boot";
    }
}
